import api from '@/api/index'
export const getOpt = (name = 'defaultData') => {
  let configValue = {}
  return new Promise((resolve) => {
    api.getMockData().then((res) => {
      configValue = JSON.parse(res.data.configValue)
      if (configValue[name] !== undefined) {
        resolve(configValue[name]);
      } else {
        resolve(null);
      }
    })
  })
}
